package com.RedRiver.hospitalsystem.personal_service.client;

import com.RedRiver.hospitalsystem.personal_service.client.param.*;
import com.RedRiver.hospitalsystem.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * contextId是项目名，name是client的名字
 */
@FeignClient(contextId = "ScheduleClient",name="personal-service",path="personalService/schedule")
public interface ScheduleClient {
    @PostMapping("/IncreaseSchedules")
    Result<?> IncreaseSchedules(@RequestBody NewDoctorSchedulesForm newDoctorSchedulesForm);

    @PostMapping("/findAllSchedules")
    Result<?> findAllSchedules(@RequestBody PageForm form);

    @PostMapping("/updateSchedules")
    Result<?> updateSchedules(@RequestBody DoctorSchedulesForm doctorSchedulesForm);

    @PostMapping("/delSchedules")
    Result<?> delSchedules(@PathVariable("schedulesId") Integer schedulesId);

    @PostMapping("/registerInformation")
     Result<Integer> registerInformation(@RequestBody RegisterInformationForm registerInformationForm);

    @PostMapping("/cancelRegisterInfomation")
     Result<Integer> cancelRegisterInfomation(@RequestBody RegisterInformationForm registerInformationForm);

    @PostMapping("/selDoctor/{id}")
     Result<List<ScheduleDoctorInfo>> selDoctor(@PathVariable("id") Integer id);
}
